It is often the case with digitized images that the entire available dynamic range (i.e., the maximum possible resolution of the brightness values) is not utilized, which, however, results in a lower contrast of the image. This applies, in particular, to older image originals (black/white feature films, etc), for example. As a result, the images appear blurred, dark and matt when they are reproduced.
Known methods for enhancing contrast are based on the density distribution of the pixels in the image and spread the dynamic range of the image, with a result that the corresponding image is more brilliant and sharper. One example thereof is the so-called histogram spreading, which has the aim of producing the flattest possible density distribution in the image, which corresponds to a relatively large contrast. Mathematically, the variance/variation is increased in this case, the contrast being proportional to the variance/variation. Applications of histogram spreading are found, in particular, in the field of medicine and radar image processing.
The principle of histogram spreading will be briefly explained in more detail below. Each image comprises i lines and j columns, so that each pixel can be designated by X(i,j), where X(i,j) describes the intensity of the image at the local position i,j in the form of a discrete brightness value. The entire image can accordingly be expressed by {X(i,j)}. In the case of an 8-bit resolution, a total of L=256 discrete brightness levels are possible, which are hereinafter designated by x0, x1 . . . xL−1.
For a given image X, its density function p(xk) is defined as follows:                               p          ⁡                      (                          x              k                        )                          =                              n            ⁡                          (                              x                k                            )                                N                                    (        1        )            
In this case, k=0, 1, 2 . . . L−1, and N denotes the number of all the pixels in the input image X, while n(xk) denotes the number of those pixels which have the discrete brightness value xk in the input image X.
The representation of the density function p(xk) against xk is referred to as a histogram of the image X. The density function of an image X is represented by way of example in FIG. 6A.
The cumulative density function of an image X is defined as:                               c          ⁡                      (                          x              k                        )                          =                              ∑                          j              =              0                        k                    ⁢                      p            ⁡                          (                              x                j                            )                                                          (        2        )            
By definition, C(xL−1)=1. Consequently, the cumulative density function c(xk) corresponds to the integral over the density function p(xk).
In the case of histogram spreading, the input image is then converted or transformed into an output image using the cumulative density function, the entire dynamic range being utilized. The transformation function used in this case is defined as:f(xk)=x0+(xL−1−x0)*c(xk)  (3)
The transformed output image Y=f(x) obtained by this transformation has an enhanced contrast. The density function of the output image processed in this way is represented in FIG. 6B. FIG. 6B reveals, in particular, that the output image has a greater variation of the brightness values. In other words, the histogram spreading results in a flatter and wider brightness density distribution.
The image revised by the histogram spreading not only has an enhanced contrast but, moreover, is distinctly brighter than the input image, and this can also be gathered from the density function of the output image as shown in FIG. 6B. This fact is a result of the histogram spreading, which converts or transforms the input values into a corresponding output value independently of the respective input value with the aid of the cumulative density function. The unnatural elevation of the contrast becomes particularly conspicuous for example in ground or sky areas of an image, which corresponds to overmodulation of the range of values of the output image. Consequently, although the contrast is enhanced with the aid of histogram spreading, the overall image impression is worse than in the original input image, the reason for this being based, inter alia, on the fact that the mean brightness of the image is not taken into account at all in the calculation. On account of these disadvantages, the method of histogram spreading presented above is only rarely used in products appertaining to consumer electronics, such as in television sets, for example. IEEE Transactions on Consumer Electronics, Vol. 43, No. 1, February 1997, “Contrast Enhancement Using Brightness Preserving Bi-Histogramm Equalization”, Y.-T. Kim, proposes a further-developed method for contrast enhancement based on histogram spreading. The method described in this document uses two different histogram spreads for two different sub-images obtained by decomposing the input image into pixels having a brightness respectively greater or less than the mean brightness of the input image. This method will be briefly explained in more detail below.
Firstly, suppose that xm denotes the mean brightness of the input image X. The input image can accordingly be decomposed into two sub-images XL and XU where X=XL∪XU, XL={X(i,j)|X(i,j)≦xm, ∀X(i,j)∈X} and XU={X(i,j)|X(i,j)>xm, ∀X(i,j)∈X}. Consequently, the sub-image XL comprises all the pixels of the input image X which have a brightness less than or equal to the mean brightness xm of the input image, while the sub-image XU comprises all the pixels of the input image X which have a brightness greater than the mean brightness xm. The following density functions can be defined for the two sub-images:                                           p            L                    ⁡                      (                          x              k                        )                          =                                            n              L                        ⁡                          (                              x                k                            )                                            N            L                                              (        4        )            
In this case, NL denotes the total number of pixels in the sub-image XL and nL(xk) denotes the number of pixels having the brightness value xk in the sub-image XL, where the following holds true for the sub-image XL: k=0, 1 . . . xm:                                           p            U                    ⁡                      (                          x              k                        )                          =                                            n              U                        ⁡                          (                              x                k                            )                                            N            U                                              (        5        )            
For the sub-image XU, in an analogous manner, NU denotes the total number of pixels in the sub-image XU and nU(xk) denotes the number of pixels having the brightness value xk in the sub-image XU, where the following holds true for the sub-image XU: k=xm+1, . . . xL−1. Equally, corresponding cumulative density functions for the two sub-images XL and XU can be defined as follows:                                           c            L                    ⁡                      (                          x              k                        )                          =                              ∑                          j              =              0                        k                    ⁢                                    p              L                        ⁡                          (                              x                j                            )                                                          (        6        )                                                      c            U                    ⁡                      (                          x              k                        )                          =                              ∑                          j              =              0                        k                    ⁢                                    p              U                        ⁡                          (                              x                j                            )                                                          (        7        )            
By definition, the following must hold true: cL(xm)=1 and cU(xL−1)=1. For the two sub-images, separate transformation functions fL(xk) and fU(xk) are now defined:ƒL(xk)=x0+(xm−x0)*cL(xk)  (8)ƒU(xk)=xm+1+(xL−1−xm+1)*cU(xk)  (9)
The brightness values of the two sub-images XL and XU are thus processed or transformed with the aid of different transformation functions, the transformed sub-images, when combined, producing the desired output image Y having enhanced contrast:Y=ƒ(X)=ƒL(XL)∪ƒU(XU)  (10)
This method spreads the input image X over the entire dynamic range [x0,xL−1], the following boundary condition holding true: the pixels having a brightness less than or equal to the mean brightness value xm being spread in the range [x0,xm] and the pixels having a brightness greater than the mean brightness value being spread in the range [xm+1,xL−1].
A circuit arrangement for realizing this method is illustrated in FIG. 7, the input image X being fed to a unit 22 for histogram calculation. Furthermore, a mean value calculation unit 24 for calculating the mean brightness value xm of the input image X is provided. The histogram determined for the input image X is divided as a function of the calculated mean brightness value xm in a further histogram division unit 23 in accordance with the sub-images XL and XU. Calculation units 26 and 27 are provided, in order to calculate the corresponding cumulative density functions cL(xk) and cU(xk), respectively, for the two sub-images XL and XU, respectively. In a mapper 28, the previously described transformation functions fL(xk) and fU(xk), respectively, are calculated using the calculated cumulative density function and the sub-images thus transformed are combined to form a transformed output image Y. Since the individual calculations have to be carried out during the duration of an image, an image memory 25 is required. However, the image memory 25 shown in FIG. 7 can also be dispensed with since there is a high degree of correlation between two directly successive images. Equally, quantization of the histogram is also possible.
The previously referenced document, discussed above, does not make any statements at all, however, with regard to how it is possible to solve various problems that arise in the current image, such as image bouncing or switching artifacts in the case of an excessively fast or excessively slow change in the contrast or transformation function, for example. Equally, there is no discussion of how to handle images that already have a good contrast. Equally, no proposals at all are made for the actual realization of the calculation of the mean brightness value xm.